#pragma once

#pragma unmanaged

#include <BWSAL\BuildEventTimeline.h>

#pragma managed

#include "..\AiBase.h"
#include "Interfaces\IBuildEventTimeline.h"
#include "Interfaces\IBuildUnitManager.h"

namespace BroodWar
{
	namespace Addon
	{
		ref class BuildUnitManager;

		public ref class BuildEventTimeline : public AiBase, IBuildEventTimeline
		{
		internal:
			BWSAL::BuildEventTimeline* instance;

			BuildEventTimeline(BWSAL::BuildEventTimeline* timeline);
			~BuildEventTimeline();
			!BuildEventTimeline();

			static BuildEventTimeline^ s_instance;
		public:
			static void Create(IBuildUnitManager^ buildUnitManager);
			static property BuildEventTimeline^ Instance { BuildEventTimeline^ get(); }

			virtual void Initialize();
			virtual void Draw();
			virtual void DrawLarvaCounts();
			virtual void AddEvent(int time, BuildEvent^ e);
			virtual void Reset();
			virtual property BuildState^ InitialState { BuildState^ get(); void set(BuildState^ value); }
			virtual String^ ToString() override;
			
			virtual IEnumerator<Tuple<int, BuildEvent^>^>^ GetEnumerator();
		private:
			virtual System::Collections::IEnumerator^ GetEnumerator2() sealed = System::Collections::IEnumerable::GetEnumerator;
		};
	}
}
